home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tridv1.zip / EXAMPLE.PAS < prev    next >
Pascal/Delphi Source File  |  1990-12-19  |  2KB  |  69 lines

  1. program example_using_TriDoor;
  2.  
  3. {**************************************************************************
  4.  
  5.    This  odd little  program  does it' s best  to show you  some  of the
  6.    applications of  some of the  commands made available  to you through
  7.    TriDoor.
  8.  
  9.    And just  to show you how easy it is, (and why this is such a strange
  10.    example) I wrote  this in about  2 minutes at 1:43 AM on 28-Nov-1990.
  11.  
  12.                   !! This is a compilable program !!
  13.  
  14.  **************************************************************************}
  15.  
  16. uses
  17.   tridr55u;                                        { the TriDoor unit! }
  18.  
  19. {  dos,  }          { not necessary, but you can add other units, too. }
  20. {  crt;  }
  21.  
  22. var
  23.   instr : string;
  24.   wait  : char;
  25.  
  26. begin
  27.   { setup; }        { setup is already done in non-registered versions }
  28.  
  29.   caps := false;                 { make sure capitals and code are off }
  30.   code := false;
  31.  
  32.   print('Welcome to the test Door!||||');           { |||| = double CR }
  33.  
  34.   print('Please enter your name : ');
  35.  
  36.   instr := getinput(35);
  37.  
  38.   ansi := true;
  39.  
  40.   print('||You entered '+instr+'||');
  41.   print('Which is '+ucase(instr)+' in capitals.||||');
  42.  
  43.   if aysure('Are you sure that this is your name') then
  44.     print('||Good. Because I was not going to let you change it anyway.||||')
  45.   else print('Tough. Suffer with it that way.||||');
  46.  
  47.   print('||Now enter thw two-letter abbreviation for your state : ');
  48.  
  49.   caps := true;                              { turn forced capitals on }
  50.   instr := getinput(2);
  51.  
  52.   writeln;
  53.   writeln(' SysOp : You can see this, user cannot! ');
  54.  
  55.   print('||User : The SysOp just saw something that you did not, but||');
  56.   print('         he can see this very well.||||');
  57.  
  58.   sysmessage('You will see stars as the user or you type in normal text.');
  59.  
  60.   print('Enter your password-to-be : ');
  61.   code := true;                                         { turn *'s on }
  62.   instr := getinput(8);
  63.  
  64.   print('||||You chose the password : '+instr+'.||||');
  65.  
  66.   print('||Press any key to end this silliness... ');
  67.   wait := getkey;
  68.  
  69. end.